/*
 * @Author: hashMi 854059946@qq.com
 * @Date: 2023-10-25 22:32:05
 * @LastEditors: hashMi 854059946@qq.com
 * @LastEditTime: 2023-11-04 17:02:39
 * @FilePath: /guiguzhenxuan/src/components/index.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import SvgIcon from './SvgIcon/index.vue'
import Category from './Category/src/index.vue'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import type { App, Component } from 'vue'

const componentsObj: { [name: string]: Component } = {
  SvgIcon,
  Category,
}

export default {
  install(app: App) {
    Object.keys(componentsObj).forEach((key: string) => {
      app.component(key, componentsObj[key])

      for (let [key, component] of Object.entries(ElementPlusIconsVue)) {
        if (key === 'Menu') {
          key = 'IconMenu'
        }
        app.component(key, component)
      }
    })
  },
}
